<!-- 首页 -->
<template>
    <div class="fire">
        <header-info></header-info>
        <map-info></map-info>
        <h3 class="h-tend">全国疫情每日新增病例走势</h3>
        <day-tend></day-tend>
        <h3 class="h-tend">全国疫情累计病例走势</h3>
        <day-conform-tend></day-conform-tend>
        <!--<epidemic-tend></epidemic-tend>-->
       <!-- <h3>全国疫情每日新增重症/治愈/死亡病例</h3>
        <day-add-case></day-add-case> -->
        <h3 class="h-tend">全国疫情每日累计治愈/死亡病例走势</h3>
        <day-total-tend></day-total-tend>
    </div>
</template>

<script>
   import MapInfo from "./childPage/MapInfo";
   import HeaderInfo from "./childPage/headerInfo/HeaderInfo";
   import DayTend from "./childPage/DayTend";
   import DayTotalTend from "./childPage/DayTotalTend";
   import DayConformTend from "./childPage/DayConformTend";

   import axios from 'axios'
    export default {
        name: "HomeIndex",
        components: {
            DayTend,DayTotalTend,DayConformTend,
            MapInfo,HeaderInfo
        },
        data: function () {
            return {
            }
        },
        created() {
            this.getData();
        },
        methods: {
            async getData() {
                let data = await this.$get(
                    'https://tianqiapi.com/api?version=epidemic&appid=31487225&appsecret=2Y6yjNKq',
                );
                this.$store.commit('setData', data.data);
                data = await this.$post(
                    'https://ncov.zhhainiao.com/ncov/data/get'
                );
                this.$store.commit('setdrData',data.ncov_data)
            },
        },

    }
</script>



<style lang="stylus" scoped>
    .fire
        margin 0 auto
       /* width 750px*/

    .h-tend{
        margin:0 0 15px 10px
    }
</style>

